#pragma once

#include <vector>

#include "BulletScript\bsBulletScript.h"
#include "Battery.h"
#include "BulletEmitter.h"

namespace BulletScript
{

	public ref class BulletMachine
	{
		bs::Machine* mMachine;

		std::vector<Battery*>* mBatteries;

		bool mDisposed;

	private:

		std::string ConvertString(System::String^ str);

	public:

		BulletMachine(int screenWidth, int screenHeight);

		~BulletMachine();

		!BulletMachine();

		void Initialise(int screenWidth, int screenHeight);

		void Reset();

		bool CompileScript(System::String^ text);

		array<System::String^>^ BulletMachine::GetLogMessages();

		BulletEmitter^ CreateEmitter(System::String^ definition, float x, float y, float angle);

		void Update(float frameTime, float playerX, float playerY, float levelTime);
	};

}

